
<div class="row">
  <div class="col-md-12">

    <div class="widget white no-padding">
      <div class="widget-tabs">
           <ul class="nav nav-tabs">
                <li class="active">
                    <a data-toggle="tab" data-target="#demo-lft-tab-1">提现</a>
                </li>
                <li class="">
                    <a data-toggle="tab" data-target="#demo-lft-tab-4">换绑</a>
                </li>
                <li class="">
                    <a data-toggle="tab" data-target="#demo-lft-tab-3">改密</a>
                </li>
                <li class="">
                    <a data-toggle="tab" data-target="#demo-lft-tab-2">对接信息</a>
                </li>
           </ul>
           <div class="tab-content">
                     <div id="demo-lft-tab-1" class="tab-pane fade active in">
              <form id="profile-form" class="" role="form" data-toggle="validator" method="POST" action="{:url('api/user/profile')}">
                  {:token()}
                  <div style="display: none">
                      <input class="form-control col-md-7 col-xs-12" name="mobile" id="mobile" type="text" value="{:XEncode($user.id)}" readonly="readonly">
                  </div>
                  <div class="">
                      <div class="row">
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <label class="control-label">收款方式</label>
                                  <select id="c-withdraw_type" data-rule="required" class="form-control" name="withdraw_type">
                                    {if condition="$site.qqwithdraw eq '1'"}
                                      <option value="QQ钱包" {if condition="$user.withdraw_type eq 'QQ钱包'"} selected="selected"{/if}>QQ钱包</option>
                                      {/if}
                                      {if condition="$site.wxwithdraw eq '1'"}
                                      <option value="微信" {if condition="$user.withdraw_type eq '微信'"} selected="selected"{/if}>微信</option>
                                      {/if}
                                      {if condition="$site.aliwithdraw eq '1'"}
                                      <option value="支付宝" {if condition="$user.withdraw_type eq '支付宝'"} selected="selected"{/if}>支付宝</option>
                                      {/if}
                                  </select>
                              </div>
                          </div>
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <label class="control-label">收款名字</label>
                                  <input id="c-withdraw_name" data-rule="required" data-tip="QQ即昵称 其他为真实姓名 填错可能会导致提现出错" class="form-control" name="withdraw_name" type="text" value="{$user.withdraw_name}">
                              </div>
                          </div>
                      </div>
                      <div class="row">
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <label class="control-label">收款账号</label>
                                  <input id="c-withdraw_account" data-rule="required" class="form-control" name="withdraw_account" type="text" value="{$user.withdraw_account}">
                              </div>
                          </div>
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <label class="control-label">联系QQ</label>
                                  <input id="c-qq" data-rule="required" class="form-control" name="qq" type="text" value="{$user.qq}" placeholder="填写您的联系QQ，便于客服沟通联系！">
                              </div>
                          </div>
                      </div>
                      <div class="mobile_validate"></div>
                  </div>
                  <div class="text-right">
                    <button class="btn btn-info" type="submit">确认</button>
                  </div>
                  
              </form>
          </div>
          <div id="demo-lft-tab-2" class="tab-pane fade">
              <form id="" class="" role="form" data-toggle="validator" method="POST" action="">
                  {:token()}
                  <div class="">
                      <div class="row">
                          <div class="col-sm-12">
                              <div class="form-group">
                                  <label class="control-label">商户ID</label>
                                  <input class="form-control" value="{$user.api_id}" disabled="disabled">
                              </div>
                          </div>
                      </div>
                      <div class="row">
                          <div class="col-sm-12">
                              <div class="form-group">
                                  <label class="control-label">商户密钥</label>
                                  <input class="form-control" value="{$user.api_key}" disabled="disabled">
                              </div>
                          </div>
                      </div>
                  </div>
                  <div class="text-right">
                    <button class="btn btn-warning btn-api" type="button">一键更换</button>
                  </div>
                  
              </form>
          </div>
          <div id="demo-lft-tab-3" class="tab-pane fade">
             <form id="changepwd-form" class="" role="form" data-toggle="validator" method="POST"action="{:url('/index/user/changepwd')}">
                  {:token()}
                  <div class="">
                      <div class="row">
                          <div class="col-sm-12">
                              <div class="form-group">
                                  <label class="control-label">旧密码</label>
                                   <input type="password" class="form-control" id="oldpassword" name="oldpassword" value="" data-rule="required" placeholder="{:__('Old password')}">
                              </div>
                          </div>
                      </div>
                      <div class="row">
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <label class="control-label">新密码</label>
                                  <input type="password" class="form-control" id="newpassword" name="newpassword" value="" data-rule="required" placeholder="{:__('New password')}" />
                              </div>
                          </div>
                          <div class="col-sm-6">
                              <div class="form-group">
                                  <label class="control-label">重复密码</label>
                                  <input type="password" class="form-control" id="renewpassword" name="renewpassword" value="" data-rule="required" placeholder="{:__('Renew password')}" />
                              </div>
                          </div>
                      </div>
                  </div>
                  <div class="text-right">
                    <button class="btn btn-info" type="submit">修改密码</button>
                  </div>
                  
              </form>
          </div>

          <div id="demo-lft-tab-4" class="tab-pane fade">
             <form id="changemobile-form" class="form-horizontal" method="post" action="{:url('api/user/changemobile')}">
          <div class="form-group">
                <label class="col-md-2 control-label">旧手机号码：
                </label>
                <div class="col-md-4">
                  <input class="form-control col-md-7 col-xs-12" type="text" value="{:substr($user.mobile,0,3)}******{:substr($user.mobile,-4)}" readonly="readonly">
                </div>
              </div>
              <div class="form-group" style="display: none">
            <label class="control-label col-xs-12 col-sm-2" for="mobile">手机号码:
            </label>
            <div class="col-xs-12 col-sm-4">
              <input class="form-control col-md-7 col-xs-12" name="mobile" id="mobile" type="text" value="{:XEncode($user.id)}" readonly="readonly">
            </div>
          </div>
      <div class="form-group">
        <label class="col-md-2 control-label">旧手机验证码：</label>
        <div class="col-md-4">
          <div class="input-group">
            <input type="text" name="old_captcha" id="old_captcha" class="form-control" placeholder="您账户已绑定的手机号为{:substr($user.mobile,0,3)}****{:substr($user.mobile,-4)}" maxlength="4" data-toggle="tooltip" title="" data-placement="top"  data-rule="required;length(4);integer[+];remote({:url('api/validate/check_sms_correct')}, captcha:#old_captcha, event=old, mobile:#mobile)">
            <span class="input-group-btn">
            <button class="btn btn-default btn-captcha" type="button" data-url="{:url('api/sms/send')}" data-type="mobile" data-event="old">获取验证码</button>
            </span> 
          <span class="msg-box n-right" for="old_captcha"></span></div>
        </div>
      </div>
      <div class="form-group">
        <label class="col-md-2 control-label">新手机号：</label>
        <div class="col-md-4">
          <input type="text" class="form-control" name="new_mobile" id="new_mobile" value="" placeholder="您的新手机号" data-rule="required;mobile;remote({:url('api/validate/check_mobile_available')}, mobile:#new_mobile, event=changemobile, id={$user.id})">
        </div>
      </div>
      <div class="form-group">
        <label class="col-md-2 control-label">新手机验证码：</label>
        <div class="col-md-4">
          <div class="input-group">
            <input type="text" name="new_captcha" id="new_captcha" class="form-control" placeholder="您的新手机验证码" maxlength="4" data-toggle="tooltip" title="" data-placement="top" data-rule="required;length(4);integer[+];remote({:url('api/validate/check_sms_correct')}, captcha:#new_captcha, event=changemobile, mobile:#new_mobile)">
            <span class="input-group-btn">
            <button class="btn btn-default btn-captcha" data-url="{:url('api/sms/send')}" data-type="new_mobile" data-event="changemobile" type="button">获取验证码</button>
            </span> 
            <span class="msg-box n-right" for="new_captcha"></span>
          </div>
        </div>
      </div>
      <div class="form-group">
         <div class="col-md-offset-2 col-md-6">
           <button type="submit" class="btn btn-success" >&nbsp;点击修改&nbsp;</button>
         </div>
      </div>
      
    </form>
          </div>
                </div>
           </div>
      </div>
